home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 6412 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  1.6 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 6c 61 6e 67 2e 63 0a | 50 61 74 68 3a 20 64 69 |.lang.c.|Path: di|
|00000020| 73 63 75 73 2e 74 65 63 | 68 6e 69 6f 6e 2e 61 63 |scus.tec|hnion.ac|
|00000030| 2e 69 6c 21 63 73 64 21 | 65 6d 69 6c 64 0a 46 72 |.il!csd!|emild.Fr|
|00000040| 6f 6d 3a 20 4b 6f 68 6e | 20 45 6d 69 6c 20 44 61 |om: Kohn| Emil Da|
|00000050| 6e 20 3c 65 6d 69 6c 64 | 40 63 73 2e 74 65 63 68 |n <emild|@cs.tech|
|00000060| 6e 69 6f 6e 2e 61 63 2e | 69 6c 3e 0a 53 75 62 6a |nion.ac.|il>.Subj|
|00000070| 65 63 74 3a 20 52 65 3a | 20 48 45 4c 50 3a 20 49 |ect: Re:| HELP: I|
|00000080| 6c 6c 65 67 61 6c 20 50 | 6f 69 6e 74 65 72 20 41 |llegal P|ointer A|
|00000090| 72 69 74 68 6d 65 74 69 | 63 20 0a 43 6f 6e 74 65 |rithmeti|c .Conte|
|000000a0| 6e 74 2d 54 79 70 65 3a | 20 54 45 58 54 2f 50 4c |nt-Type:| TEXT/PL|
|000000b0| 41 49 4e 3b 20 63 68 61 | 72 73 65 74 3d 55 53 2d |AIN; cha|rset=US-|
|000000c0| 41 53 43 49 49 0a 4f 72 | 67 61 6e 69 7a 61 74 69 |ASCII.Or|ganizati|
|000000d0| 6f 6e 3a 20 54 65 63 68 | 6e 69 6f 6e 2c 20 49 73 |on: Tech|nion, Is|
|000000e0| 72 61 65 6c 20 49 6e 73 | 74 69 74 75 74 65 20 6f |rael Ins|titute o|
|000000f0| 66 20 54 65 63 68 6e 6f | 6c 6f 67 79 0a 44 61 74 |f Techno|logy.Dat|
|00000100| 65 3a 20 53 61 74 2c 20 | 32 34 20 46 65 62 20 31 |e: Sat, |24 Feb 1|
|00000110| 39 39 36 20 30 34 3a 31 | 36 3a 35 31 20 47 4d 54 |996 04:1|6:51 GMT|
|00000120| 0a 4d 65 73 73 61 67 65 | 2d 49 44 3a 20 3c 50 69 |.Message|-ID: <Pi|
|00000130| 6e 65 2e 53 56 34 2e 33 | 2e 39 31 2d 68 65 62 2d |ne.SV4.3|.91-heb-|
|00000140| 32 2e 30 34 2e 39 36 30 | 32 32 34 30 36 31 33 30 |2.04.960|22406130|
|00000150| 34 2e 31 37 34 36 31 43 | 2d 31 30 30 30 30 30 40 |4.17461C|-100000@|
|00000160| 63 73 2e 74 65 63 68 6e | 69 6f 6e 2e 61 63 2e 69 |cs.techn|ion.ac.i|
|00000170| 6c 3e 0a 4d 69 6d 65 2d | 56 65 72 73 69 6f 6e 3a |l>.Mime-|Version:|
|00000180| 20 31 2e 30 0a 49 6e 2d | 52 65 70 6c 79 2d 54 6f | 1.0.In-|Reply-To|
|00000190| 3a 20 3c 34 67 6a 30 75 | 67 24 37 33 30 40 6e 65 |: <4gj0u|g$730@ne|
|000001a0| 77 73 2e 6f 6e 65 2e 6e | 65 74 3e 20 0a 58 2d 4e |ws.one.n|et> .X-N|
|000001b0| 6e 74 70 2d 50 6f 73 74 | 69 6e 67 2d 48 6f 73 74 |ntp-Post|ing-Host|
|000001c0| 3a 20 63 73 64 2e 63 73 | 2e 74 65 63 68 6e 69 6f |: csd.cs|.technio|
|000001d0| 6e 2e 61 63 2e 69 6c 0a | 52 65 66 65 72 65 6e 63 |n.ac.il.|Referenc|
|000001e0| 65 73 3a 20 3c 34 67 6a | 30 75 67 24 37 33 30 40 |es: <4gj|0ug$730@|
|000001f0| 6e 65 77 73 2e 6f 6e 65 | 2e 6e 65 74 3e 20 0a 53 |news.one|.net> .S|
|00000200| 65 6e 64 65 72 3a 20 6e | 65 77 73 40 64 69 73 63 |ender: n|ews@disc|
|00000210| 75 73 2e 74 65 63 68 6e | 69 6f 6e 2e 61 63 2e 69 |us.techn|ion.ac.i|
|00000220| 6c 20 28 4e 65 77 73 20 | 73 79 73 74 65 6d 29 0a |l (News |system).|
|00000230| 58 2d 53 65 6e 64 65 72 | 3a 20 65 6d 69 6c 64 40 |X-Sender|: emild@|
|00000240| 63 73 64 0a 0a 0a 0a 4f | 6e 20 32 33 20 46 65 62 |csd....O|n 23 Feb|
|00000250| 20 31 39 39 36 2c 20 4f | 72 65 6e 20 4c 65 76 69 | 1996, O|ren Levi|
|00000260| 6e 20 77 72 6f 74 65 3a | 0a 0a 3e 20 49 20 77 61 |n wrote:|..> I wa|
|00000270| 73 20 77 6f 6e 64 65 72 | 69 6e 67 20 69 66 20 73 |s wonder|ing if s|
|00000280| 6f 6d 65 6f 6e 65 20 63 | 6f 75 6c 64 20 68 65 6c |omeone c|ould hel|
|00000290| 70 20 6d 65 2e 20 49 27 | 6d 20 69 6e 20 74 68 65 |p me. I'|m in the|
|000002a0| 20 6d 69 64 73 74 20 6f | 66 20 6c 65 61 72 6e 69 | midst o|f learni|
|000002b0| 6e 67 0a 3e 20 43 2f 43 | 2b 2b 20 61 6e 64 20 61 |ng.> C/C|++ and a|
|000002c0| 6d 20 74 72 79 69 6e 67 | 20 74 6f 20 70 72 6f 67 |m trying| to prog|
|000002d0| 72 61 6d 20 74 68 65 20 | 65 78 61 6d 70 6c 65 73 |ram the |examples|
|000002e0| 20 69 6e 20 41 6e 64 72 | 65 77 20 42 69 72 6e 73 | in Andr|ew Birns|
|000002f0| 74 6f 63 6b 20 61 6e 64 | 20 4a 6f 68 6e 0a 3e 20 |tock and| John.> |
|00000300| 52 65 78 27 73 20 62 6f | 6f 6b 20 22 50 72 61 63 |Rex's bo|ok "Prac|
|00000310| 74 69 63 61 6c 20 41 6c | 67 6f 72 69 74 68 79 6d |tical Al|gorithym|
|00000320| 73 20 66 6f 72 20 50 72 | 6f 67 72 61 6d 65 72 73 |s for Pr|ogramers|
|00000330| 2e 22 20 49 20 61 6d 20 | 75 73 69 6e 67 20 53 79 |." I am |using Sy|
|00000340| 6d 65 6e 74 65 63 27 73 | 0a 3e 20 54 68 69 6e 6b |mentec's|.> Think|
|00000350| 20 43 2b 2b 20 28 76 20 | 36 20 2d 20 4d 61 63 29 | C++ (v |6 - Mac)|
|00000360| 2e 0a 3e 20 54 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |..> The |followin|
|00000370| 67 20 63 6f 64 65 20 69 | 73 20 67 69 76 69 6e 67 |g code i|s giving|
|00000380| 20 6d 65 20 61 20 22 69 | 6c 6c 65 67 61 6c 20 70 | me a "i|llegal p|
|00000390| 6f 69 6e 74 65 72 20 61 | 72 69 74 68 6d 65 74 69 |ointer a|rithmeti|
|000003a0| 63 22 20 65 72 72 6f 72 | 2e 0a 3e 20 49 27 6d 20 |c" error|..> I'm |
|000003b0| 74 72 79 69 6e 67 20 74 | 6f 20 73 74 72 69 70 20 |trying t|o strip |
|000003c0| 74 68 65 20 63 61 72 72 | 61 67 65 20 72 65 74 75 |the carr|age retu|
|000003d0| 72 6e 20 6f 66 66 20 6f | 66 20 61 20 6c 69 6e 65 |rn off o|f a line|
|000003e0| 20 6f 66 20 74 65 78 74 | 20 72 65 61 64 20 66 72 | of text| read fr|
|000003f0| 6f 6d 20 61 0a 3e 20 66 | 69 6c 65 2e 0a 3e 20 0a |om a.> f|ile..> .|
|00000400| 3e 20 54 49 41 20 66 6f | 72 20 74 68 65 20 68 65 |> TIA fo|r the he|
|00000410| 6c 70 2e 0a 3e 20 4f 72 | 65 6e 20 4c 65 76 69 6e |lp..> Or|en Levin|
|00000420| 0a 3e 20 6f 72 65 6e 40 | 6f 6e 65 2e 6e 65 74 0a |.> oren@|one.net.|
|00000430| 3e 20 0a 3e 20 3d 3d 3d | 20 63 6f 64 65 20 73 6e |> .> ===| code sn|
|00000440| 69 70 70 65 74 20 3d 3d | 3d 0a 3e 20 09 09 77 68 |ippet ==|=.> ..wh|
|00000450| 69 6c 65 20 28 21 20 66 | 65 6f 66 20 28 66 69 6e |ile (! f|eof (fin|
|00000460| 29 29 0a 3e 20 09 09 7b | 0a 3e 20 09 09 09 2f 2a |)).> ..{|.> .../*|
|00000470| 20 72 65 61 64 20 61 20 | 72 65 63 6f 72 64 20 2a | read a |record *|
|00000480| 2f 0a 3e 20 09 09 09 69 | 66 20 28 66 67 65 74 73 |/.> ...i|f (fgets|
|00000490| 20 28 62 75 66 66 65 72 | 2c 20 31 32 37 2c 20 66 | (buffer|, 127, f|
|000004a0| 69 6e 29 20 3d 3d 20 4e | 55 4c 4c 29 0a 3e 20 09 |in) == N|ULL).> .|
|000004b0| 09 09 09 62 72 65 61 6b | 3b 0a 3e 20 09 09 09 0a |...break|;.> ....|
|000004c0| 3e 20 09 09 09 2f 2a 20 | 67 65 74 20 72 69 64 20 |> .../* |get rid |
|000004d0| 6f 66 20 74 68 65 20 74 | 72 61 69 6c 69 6e 67 20 |of the t|railing |
|000004e0| 63 61 72 72 61 67 65 20 | 72 65 74 75 72 6e 20 2a |carrage |return *|
|000004f0| 2f 0a 3e 20 09 09 09 62 | 75 66 66 65 72 20 5b 73 |/.> ...b|uffer [s|
|00000500| 74 72 6c 65 6e 20 28 62 | 75 66 66 65 72 29 20 2d |trlen (b|uffer) -|
|00000510| 20 31 5d 20 3d 20 22 5c | 30 22 3b 0a 20 20 20 20 | 1] = "\|0";. |
|00000520| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000530| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000540| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000550| 20 20 20 5e 5e 5e 0a 20 | 20 20 20 20 20 20 20 20 | ^^^. | |
|00000560| 54 68 69 73 20 69 73 20 | 74 68 65 20 70 72 6f 62 |This is |the prob|
|00000570| 6c 65 6d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |lem | |
|00000580| 20 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2b 2b | -------|------++|
|00000590| 2b 0a 20 0a 0a 62 75 66 | 66 65 72 5b 69 6e 64 65 |+. ..buf|fer[inde|
|000005a0| 78 5d 20 69 73 20 61 20 | 63 68 61 72 20 61 6e 64 |x] is a |char and|
|000005b0| 20 22 5c 30 22 20 28 61 | 6e 79 77 61 79 20 61 20 | "\0" (a|nyway a |
|000005c0| 76 65 72 79 20 77 65 69 | 72 64 20 73 74 72 69 6e |very wei|rd strin|
|000005d0| 67 2c 20 63 6f 6e 73 69 | 73 74 69 6e 67 20 0a 6f |g, consi|sting .o|
|000005e0| 66 20 74 77 6f 20 6e 75 | 6c 20 63 68 61 72 61 63 |f two nu|l charac|
|000005f0| 74 65 72 73 29 20 69 73 | 20 6f 66 20 74 79 70 65 |ters) is| of type|
|00000600| 20 63 6f 6e 73 74 20 63 | 68 61 72 20 2a 2e 0a 0a | const c|har *...|
|00000610| 54 6f 20 73 6f 6c 76 65 | 20 74 68 65 20 70 72 6f |To solve| the pro|
|00000620| 62 6c 65 6d 2c 20 72 65 | 70 6c 61 63 65 20 22 5c |blem, re|place "\|
|00000630| 30 22 20 77 69 74 68 20 | 27 5c 30 27 2e 0a 0a 48 |0" with |'\0'...H|
|00000640| 6f 70 65 20 74 68 69 73 | 20 68 65 6c 70 73 2e 0a |ope this| helps..|
|00000650| 0a 0a 09 09 09 09 09 09 | 52 65 67 61 72 64 73 2c |........|Regards,|
|00000660| 20 0a 0a 09 09 09 09 09 | 09 09 09 45 6d 69 6c 0a | .......|...Emil.|
+--------+-------------------------+-------------------------+--------+--------+